home *** CD-ROM | disk | FTP | other *** search
- #include <Types.h>
- #include <Memory.h>
- #include <Quickdraw.h>
- #include <TextEdit.h>
- #include <Dialogs.h>
- #include <Devices.h>
- #include <Scrap.h>
- #include <menus.h>
- #include <PPCToolbox.h>
- #include <AppleEvents.h>
- #include <StandardFile.h>
- #include <EPPC.h>
- #include <Aliases.h>
- #include <events.h>
- #include <gestaltequ.h>
- #include <ToolUtils.h>
-
- /* Types */
- struct MyPPCRec {
- PPCParamBlockRec pB;
- Ptr buffer; /* buffer we're using */
- Size bufferSize; /* guess */
- Handle dataToXfer;
- PPCPortPtr myPort;
- PPCPortPtr buddyPortPtr;
- PPCPortRefNum ourPort;
- PPCSessRefNum currentSessionRef;
-
- };
- typedef struct MyPPCRec MyPPCRec, *MyPPCRecPtr,**MyPPCRecHandle;
-
-
- typedef struct CDEVRec {
- Handle spare;
- MyPPCRecPtr myPPCBlock;
- /* LocationName won't be needed, since we're staying local */
- Boolean searchForTarget; /* searchForTarget is our flag to tell us that we do not */
- /* know where AEBuddy is yet, and we have to keep looking. */
- /* It also implies (if true) that PBCat has already been */
- /* called, if necessary */
- Boolean noBuddy; /* PBCatSearch failed, give it up */
- Boolean notSys7;
- Boolean eventPending;
- } CDEVRec, *CDEVPtr, **CDEVHnd;
-
-
- struct MyPPCRecDeamon { /* to differentiate it from the one I'm using in the CDEV */
- PPCParamBlockRec pB;
- Ptr buffer; /* buffer we're using */
- Size bufferSize; /* guess */
- Handle dataToXfer;
- PPCPortPtr myPort;
- PPCPortRefNum ourPort;
- PPCSessRefNum currentSessionRef;
- };
-
- typedef struct MyPPCRecDeamon MyPPCRecDeamon, *MyPPCRecPtrDeamon,**MyPPCRecHandleDeamon;
-
-
- #define kOneK 1024
- #define kSendButton 1
- #define kNoBuddyAlert -4048
- #define kNot70 -4049
- #define kStringsID -4048
- #define kBrowse1 1
- #define kBrowse2 2
- #define kMyName 3
- #define kWatchCursor 4
-
- enum {
- kMyTypeOfData = 0x4D415654, // 'MAVT'
- kGenericCreator = 0x3F3F3F3F // '????'
- };
-
-
- void InitAEStuff(void);
- void DoHighLevel(EventRecord *AERecord);
- pascal OSErr AEOpenHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- pascal OSErr AEOpenDocHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- pascal OSErr AEPrintHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- pascal OSErr AEQuitHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- Boolean InformTheWorld(void);
- OSErr OpenAPort(PPCOpenPBPtr myPort);
- Boolean DoInform(PPCInformPBPtr p);
- void CloseOffTheWorld(void);
- void OpenComplete(PPCInformPBPtr p);
- void InformComplete(PPCReadPBPtr p);
- void ReadComplete(PPCReadPBPtr p);
- void CollectLastData(void);
-
-